package com.yanghui.dtracing.boot.banner;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class BannerPrint {

    public static void printBanner(){
        InputStreamReader inputStreamReader = null;
        BufferedReader bufferedReader = null;
        try{
             inputStreamReader = new InputStreamReader(
                    Thread.currentThread().getContextClassLoader().getResourceAsStream("agentBanner.txt"));
            bufferedReader = new BufferedReader(inputStreamReader);
            String line = "";
            while((line = bufferedReader.readLine()) != null) {
                System.out.println(line);
            }
        }catch (Exception e){
            //ignore
        }finally {
            try{
                if(inputStreamReader != null){
                    inputStreamReader.close();
                }
                if(bufferedReader != null){
                    bufferedReader.close();
                }
            }catch (Exception e){
                //ignore
            }
        }
    }
}
